<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html>
<html lang="zh-cn">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
    <meta name="renderer" content="webkit">
    <title>亿乐购后台管理系统</title>
    <link rel="stylesheet" href="/wcs/Public/admin/css/pintuer.css">
    <link rel="stylesheet" href="/wcs/Public/admin/css/admin.css">
    <link rel="stylesheet" href="/wcs/Public/admin/css/order.css">
    <script src="/wcs/Public/admin/js/jquery.js"></script>
    <script src="/wcs/Public/admin/js/pintuer.js"></script>
    <script src="/wcs/Public/admin/js/respond.js"></script>
    <script src="/wcs/Public/admin/js/admin.js"></script>
    <script src="/wcs/Public/admin/js/order.js"></script>
    <script type="text/javascript">
    //产品页面加载的js

    function ajaxpage($page){
    	$.ajax( {    
    	    url:"<?php echo U('admin/order/ajaxpage');?>",// 跳转到 action    
    	    data:{
    	    	p:$page
    	    },    
    	    type:'get',    
    	    dataType:'json',
    	    beforeSend:function(XMLHttpRequest){
    	    	$("#ajaxpagedata").html("正在加载中。。。");
        	 },    
    	    success:function(data) {
    			$("#ajaxpagehtml").html(data.show);
          	    var pagehmtl="<button onclick=get_payment_val>已付款订单</button><button onclick=>未付款订单</button><button onclick=>已收货订单</button><button onclick=>未收货订单</button>";
            	pagehmtl+="<table class='table table-hover'><tr><th>订单号</th><th>购车号</th><th>用户编码</th><th>是否付款</th><th>是否收货</th><th>合计</th><th>详细信息</th></tr>";
    			var list=data.list;
          		for(var i=0; i<list.length; i++)  
       		    {
    	   		    //付款和是否收到替换文字
    	   		    var $payment =  exchange_value(list[i].payment,1,'未付款','已付款');
    		   		var $isaccept = exchange_value(list[i].isaccept,1,'未收货','已收货'); 
    	   		    pagehmtl+="<tr><th>"+list[i].onumber+"</th><th>"+list[i].shoppingcarid+"</th><th>"+list[i].userid+"</th><th>"+$payment+"</th><th>"+$isaccept+"</th><th><a style='font-size:18px;color:red;'>"+list[i].price+"(元)</a></th><th><a>详细信息</a></th></tr>";  
       		    }
          		pagehmtl+="</table>"; 
        	    $("#ajaxpagedata").html(pagehmtl);      
    	     },    
    	     error : function() {
    	    	 $("#ajaxpage").html('加载数据失败！');    
    	     }    
    	});
    }
    </script>
</head>

<body>
<div class="lefter">
    <div class="logo"><a href="#" ><img src="/wcs/Public/admin/images/logo.png" alt="亿乐购后台管理系统" /></a></div>
</div>
<div class="righter nav-navicon" id="admin-nav">
    <div class="mainer">
        <div class="admin-navbar">
            <span class="float-right">
            	<a class="button button-little bg-main" href="<?php echo U('admin/index/index');?>" >前台首页</a>
                <a class="button button-little bg-yellow" href="<?php echo U('admin/login/logout');?>">注销登录</a>
            </span>
            <ul class="nav nav-inline admin-nav">
                <li><a href="<?php echo U('admin/index/index');?>" class="icon-home"> 开始</a>
                </li>
                <li><a href="<?php echo U('admin/user/index');?>" class="icon-shopping-cart"> 用户管理 </a>
                </li>
                <li><a href="<?php echo U('admin/pclass/index');?>" class="icon-shopping-cart"> 分类管理 </a>
                </li>
                <li><a href="<?php echo U('admin/product/index');?>" class="icon-shopping-cart"> 产品管理  </a>
                </li>
                <li class="active"><a href="<?php echo U('admin/order/index');?>" class="icon-shopping-cart"> 订单管理  </a>
					<ul><li><a style="font-weight:bold;" href="#" > 订单管理 </a></li><li class="active"><a href="#"> 订单管理  </a></li></ul>
                </li>
                <li><a href="<?php echo U('admin/statistic/index');?>" class="icon-shopping-cart"> 统计  </a>
                </li>
                <li><a href="<?php echo U('admin/Channel/index');?>" class="icon-shopping-cart"> 渠道管理  </a>
                </li>
            </ul>
        </div>
        <div class="admin-bread">
            <span>您好，<a style="color:red;"><?php echo ($_SESSION['user']['name']); ?></a> ，欢迎您的光临。</span>
            <ul class="bread">
                <li><a href="<?php echo U('admin/index/index');?>" class="icon-home"> 开始</a></li>
                <li>后台首页</li>
            </ul>
        </div>
    </div>
</div>

<div class="admin">

    <div class="tab">
      <div class="tab-head">
        <strong>订单管理</strong>
        <ul class="tab-nav">
          <li class="active"><a href="#tab-set">订单查询</a></li>
          <li><a href="#tab-email">已付款订单</a></li>
        </ul>
      </div>
      <div class="tab-body">
        <br />
        <div class="tab-panel active" id="tab-set">
            <div id="ajaxpagedata"></div>
        	<div id="ajaxpagehtml">
				<button onclick="ajaxpage(1)">点击我获取数据</button>        	
        	</div>
        </div>
        <div class="tab-panel" id="tab-email">编辑系统管理员</div>
      </div>
    </div>
    <p class="text-right text-gray"><a class="text-gray" href="#"><?php echo C('version');?></a></p>
</div>

</body>
</html>